]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Stop using clone terminology in WindowPreviewLayout
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 8 Jun 2020 07:32:23 +0000 (09:32 +0200)
committerJonas Dreßler <verdre@v0yd.nl>
Tue, 16 Jun 2020 12:04:10 +0000 (14:04 +0200)
We're going to remove ClutterClones, so call the parameters to
addWindow() and removeWindow() "actor" instead of "clone". Also make the
destroyIds less confusing and rename the actual actor destroy id to
"destroyId", and rename the window actors destroy id to
"windowActorDestroyId".

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307

js/ui/workspace.js

index 82b51e7d9011a7baeb4de569aa19074fde9daa9b..e50d8b30d2ba1dfd6c6b8a3453250c4447ae2673 100644 (file)
@@ -118,42 +118,42 @@ var WindowPreviewLayout = GObject.registerClass({
         }
     }
 
-    addWindow(clone, metaWindow) {
-        if (this._windows.has(clone))
+    addWindow(actor, metaWindow) {
+        if (this._windows.has(actor))
             return;
 
         const windowActor = metaWindow.get_compositor_private();
 
-        this._windows.set(clone, {
+        this._windows.set(actor, {
             metaWindow,
             windowActor,
             sizeChangedId: metaWindow.connect('size-changed', () =>
                 this._layoutChanged()),
             positionChangedId: metaWindow.connect('position-changed', () =>
                 this._layoutChanged()),
-            destroyId: windowActor.connect('destroy', () =>
-                clone.destroy()),
-            cloneDestroyId: clone.connect('destroy', () =>
-                this.removeWindow(clone)),
+            windowActorDestroyId: windowActor.connect('destroy', () =>
+                actor.destroy()),
+            destroyId: actor.connect('destroy', () =>
+                this.removeWindow(actor)),
         });
 
-        this._container.add_child(clone);
+        this._container.add_child(actor);
 
         this._layoutChanged();
     }
 
-    removeWindow(clone) {
-        const windowInfo = this._windows.get(clone);
+    removeWindow(actor) {
+        const windowInfo = this._windows.get(actor);
         if (!windowInfo)
             return;
 
         windowInfo.metaWindow.disconnect(windowInfo.sizeChangedId);
         windowInfo.metaWindow.disconnect(windowInfo.positionChangedId);
-        windowInfo.windowActor.disconnect(windowInfo.destroyId);
-        clone.disconnect(windowInfo.cloneDestroyId);
+        windowInfo.windowActor.disconnect(windowInfo.windowActorDestroyId);
+        actor.disconnect(windowInfo.destroyId);
 
-        this._windows.delete(clone);
-        this._container.remove_child(clone);
+        this._windows.delete(actor);
+        this._container.remove_child(actor);
 
         this._layoutChanged();
     }